type classMethodDecorator = (value: Function, context: {
    kind: 'method',          //被装饰值的类型可以是 class method getter setter field accessor(没学) 之一
    name: String,            // 表示被装饰的的值的名称
    static: boolean,         // 表示值是否是静态属性
    private: boolean,        // 表示值是否是私有的类元素
}) => Function | void
function Logger<classMethodDecorator>(value, context) {
    const { kind, name,static:Static,private:Private } = context;
    console.log(Static,Private);
    if (kind === 'method') {
        return function (...args) {
            console.log(`starting ${name} with arguments: ${args.join(',')}`);
            const resuslt = value.call(this, ...args);
            console.log(`ending ${name}`);
            return resuslt
        }
    }
}
class myClass {
    @Logger
    public sum(a, b) {
        myClass.hello('static 静态方法');
        return a + b;
    }

    @Logger
    private static hello(message: string) {
        return message
    }
}

const count = new myClass()
count.sum(1, 2);
